<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>octant.extern.pupynere</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="octant-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="octant-module.html">Package&nbsp;octant</a> ::
        <a href="octant.extern-module.html">Package&nbsp;extern</a> ::
        Module&nbsp;pupynere
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="octant.extern.pupynere-module.html">Module octant.extern.pupynere</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-docstring">"""NetCDF reader.</tt> </tt>
<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"><tt class="py-docstring">Pupynere implements a PUre PYthon NEtcdf REader.</tt> </tt>
<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"> </tt>
<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"><tt class="py-name">__author__</tt> <tt class="py-op">=</tt> <tt class="py-string">"Roberto De Almeida &lt;rob@pydap.org&gt;"</tt> </tt>
<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"> </tt>
<a name="L8"></a><tt class="py-lineno">  8</tt>  <tt class="py-line"> </tt>
<a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">struct</tt> </tt>
<a name="L10"></a><tt class="py-lineno"> 10</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">itertools</tt> </tt>
<a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">mmap</tt> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line"> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">numpy</tt> <tt class="py-keyword">import</tt> <tt class="py-name">ndarray</tt><tt class="py-op">,</tt> <tt class="py-name">zeros</tt><tt class="py-op">,</tt> <tt class="py-name">array</tt> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt>  <tt class="py-line"> </tt>
<a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line"> </tt>
<a name="L16"></a><tt class="py-lineno"> 16</tt>  <tt class="py-line"><tt id="link-0" class="py-name" targets="Variable octant.extern.pupynere.ABSENT=octant.extern.pupynere-module.html#ABSENT"><a title="octant.extern.pupynere.ABSENT" class="py-name" href="#" onclick="return doclink('link-0', 'ABSENT', 'link-0');">ABSENT</a></tt>       <tt class="py-op">=</tt> <tt class="py-string">'\x00'</tt> <tt class="py-op">*</tt> <tt class="py-number">8</tt> </tt>
<a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line"><tt id="link-1" class="py-name" targets="Variable octant.extern.pupynere.ZERO=octant.extern.pupynere-module.html#ZERO"><a title="octant.extern.pupynere.ZERO" class="py-name" href="#" onclick="return doclink('link-1', 'ZERO', 'link-1');">ZERO</a></tt>         <tt class="py-op">=</tt> <tt class="py-string">'\x00'</tt> <tt class="py-op">*</tt> <tt class="py-number">4</tt> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line"><tt id="link-2" class="py-name" targets="Variable octant.extern.pupynere.NC_BYTE=octant.extern.pupynere-module.html#NC_BYTE"><a title="octant.extern.pupynere.NC_BYTE" class="py-name" href="#" onclick="return doclink('link-2', 'NC_BYTE', 'link-2');">NC_BYTE</a></tt>      <tt class="py-op">=</tt> <tt class="py-string">'\x00\x00\x00\x01'</tt>  </tt>
<a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line"><tt id="link-3" class="py-name" targets="Variable octant.extern.pupynere.NC_CHAR=octant.extern.pupynere-module.html#NC_CHAR"><a title="octant.extern.pupynere.NC_CHAR" class="py-name" href="#" onclick="return doclink('link-3', 'NC_CHAR', 'link-3');">NC_CHAR</a></tt>      <tt class="py-op">=</tt> <tt class="py-string">'\x00\x00\x00\x02'</tt> </tt>
<a name="L20"></a><tt class="py-lineno"> 20</tt>  <tt class="py-line"><tt id="link-4" class="py-name" targets="Variable octant.extern.pupynere.NC_SHORT=octant.extern.pupynere-module.html#NC_SHORT"><a title="octant.extern.pupynere.NC_SHORT" class="py-name" href="#" onclick="return doclink('link-4', 'NC_SHORT', 'link-4');">NC_SHORT</a></tt>     <tt class="py-op">=</tt> <tt class="py-string">'\x00\x00\x00\x03'</tt> </tt>
<a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line"><tt id="link-5" class="py-name" targets="Variable octant.extern.pupynere.NC_INT=octant.extern.pupynere-module.html#NC_INT"><a title="octant.extern.pupynere.NC_INT" class="py-name" href="#" onclick="return doclink('link-5', 'NC_INT', 'link-5');">NC_INT</a></tt>       <tt class="py-op">=</tt> <tt class="py-string">'\x00\x00\x00\x04'</tt> </tt>
<a name="L22"></a><tt class="py-lineno"> 22</tt>  <tt class="py-line"><tt id="link-6" class="py-name" targets="Variable octant.extern.pupynere.NC_FLOAT=octant.extern.pupynere-module.html#NC_FLOAT"><a title="octant.extern.pupynere.NC_FLOAT" class="py-name" href="#" onclick="return doclink('link-6', 'NC_FLOAT', 'link-6');">NC_FLOAT</a></tt>     <tt class="py-op">=</tt> <tt class="py-string">'\x00\x00\x00\x05'</tt> </tt>
<a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line"><tt id="link-7" class="py-name" targets="Variable octant.extern.pupynere.NC_DOUBLE=octant.extern.pupynere-module.html#NC_DOUBLE"><a title="octant.extern.pupynere.NC_DOUBLE" class="py-name" href="#" onclick="return doclink('link-7', 'NC_DOUBLE', 'link-7');">NC_DOUBLE</a></tt>    <tt class="py-op">=</tt> <tt class="py-string">'\x00\x00\x00\x06'</tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line"><tt id="link-8" class="py-name" targets="Variable octant.extern.pupynere.NC_DIMENSION=octant.extern.pupynere-module.html#NC_DIMENSION"><a title="octant.extern.pupynere.NC_DIMENSION" class="py-name" href="#" onclick="return doclink('link-8', 'NC_DIMENSION', 'link-8');">NC_DIMENSION</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'\x00\x00\x00\n'</tt> </tt>
<a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line"><tt id="link-9" class="py-name" targets="Variable octant.extern.pupynere.NC_VARIABLE=octant.extern.pupynere-module.html#NC_VARIABLE"><a title="octant.extern.pupynere.NC_VARIABLE" class="py-name" href="#" onclick="return doclink('link-9', 'NC_VARIABLE', 'link-9');">NC_VARIABLE</a></tt>  <tt class="py-op">=</tt> <tt class="py-string">'\x00\x00\x00\x0b'</tt> </tt>
<a name="L26"></a><tt class="py-lineno"> 26</tt>  <tt class="py-line"><tt id="link-10" class="py-name" targets="Variable octant.extern.pupynere.NC_ATTRIBUTE=octant.extern.pupynere-module.html#NC_ATTRIBUTE"><a title="octant.extern.pupynere.NC_ATTRIBUTE" class="py-name" href="#" onclick="return doclink('link-10', 'NC_ATTRIBUTE', 'link-10');">NC_ATTRIBUTE</a></tt> <tt class="py-op">=</tt> <tt class="py-string">'\x00\x00\x00\x0c'</tt> </tt>
<a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line"> </tt>
<a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line"> </tt>
<a name="NetCDFFile"></a><div id="NetCDFFile-def"><a name="L29"></a><tt class="py-lineno"> 29</tt> <a class="py-toggle" href="#" id="NetCDFFile-toggle" onclick="return toggle('NetCDFFile');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="octant.extern.pupynere.NetCDFFile-class.html">NetCDFFile</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NetCDFFile-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="NetCDFFile-expanded"><a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line">    <tt class="py-docstring">"""A NetCDF file parser."""</tt> </tt>
<a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line"> </tt>
<a name="NetCDFFile.__init__"></a><div id="NetCDFFile.__init__-def"><a name="L32"></a><tt class="py-lineno"> 32</tt> <a class="py-toggle" href="#" id="NetCDFFile.__init__-toggle" onclick="return toggle('NetCDFFile.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="octant.extern.pupynere.NetCDFFile-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">file</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NetCDFFile.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="NetCDFFile.__init__-expanded"><a name="L33"></a><tt class="py-lineno"> 33</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_buffer</tt> <tt class="py-op">=</tt> <tt class="py-name">open</tt><tt class="py-op">(</tt><tt class="py-name">file</tt><tt class="py-op">,</tt> <tt class="py-string">'rb'</tt><tt class="py-op">)</tt> </tt>
<a name="L34"></a><tt class="py-lineno"> 34</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_parse</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line"> </tt>
<a name="NetCDFFile.read"></a><div id="NetCDFFile.read-def"><a name="L36"></a><tt class="py-lineno"> 36</tt> <a class="py-toggle" href="#" id="NetCDFFile.read-toggle" onclick="return toggle('NetCDFFile.read');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="octant.extern.pupynere.NetCDFFile-class.html#read">read</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">size</tt><tt class="py-op">=</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NetCDFFile.read-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="NetCDFFile.read-expanded"><a name="L37"></a><tt class="py-lineno"> 37</tt>  <tt class="py-line">        <tt class="py-docstring">"""Alias for reading the file buffer."""</tt> </tt>
<a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_buffer</tt><tt class="py-op">.</tt><tt id="link-11" class="py-name" targets="Method octant.extern.pupynere.NetCDFFile.read()=octant.extern.pupynere.NetCDFFile-class.html#read"><a title="octant.extern.pupynere.NetCDFFile.read" class="py-name" href="#" onclick="return doclink('link-11', 'read', 'link-11');">read</a></tt><tt class="py-op">(</tt><tt class="py-name">size</tt><tt class="py-op">)</tt> </tt>
</div><a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line"> </tt>
<a name="NetCDFFile._parse"></a><div id="NetCDFFile._parse-def"><a name="L40"></a><tt class="py-lineno"> 40</tt> <a class="py-toggle" href="#" id="NetCDFFile._parse-toggle" onclick="return toggle('NetCDFFile._parse');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="octant.extern.pupynere.NetCDFFile-class.html#_parse">_parse</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NetCDFFile._parse-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="NetCDFFile._parse-expanded"><a name="L41"></a><tt class="py-lineno"> 41</tt>  <tt class="py-line">        <tt class="py-docstring">"""Initial parsing of the header."""</tt> </tt>
<a name="L42"></a><tt class="py-lineno"> 42</tt>  <tt class="py-line">        <tt class="py-comment"># Check magic bytes.</tt> </tt>
<a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">assert</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-12" class="py-name"><a title="octant.extern.pupynere.NetCDFFile.read" class="py-name" href="#" onclick="return doclink('link-12', 'read', 'link-11');">read</a></tt><tt class="py-op">(</tt><tt class="py-number">3</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">'CDF'</tt> </tt>
<a name="L44"></a><tt class="py-lineno"> 44</tt>  <tt class="py-line"> </tt>
<a name="L45"></a><tt class="py-lineno"> 45</tt>  <tt class="py-line">        <tt class="py-comment"># Read version byte.</tt> </tt>
<a name="L46"></a><tt class="py-lineno"> 46</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">byte</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-13" class="py-name"><a title="octant.extern.pupynere.NetCDFFile.read" class="py-name" href="#" onclick="return doclink('link-13', 'read', 'link-11');">read</a></tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L47"></a><tt class="py-lineno"> 47</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">version_byte</tt> <tt class="py-op">=</tt> <tt class="py-name">struct</tt><tt class="py-op">.</tt><tt class="py-name">unpack</tt><tt class="py-op">(</tt><tt class="py-string">'&gt;b'</tt><tt class="py-op">,</tt> <tt class="py-name">byte</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line"> </tt>
<a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line">        <tt class="py-comment"># Read header info.</tt> </tt>
<a name="L50"></a><tt class="py-lineno"> 50</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_numrecs</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L51"></a><tt class="py-lineno"> 51</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_dim_array</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L52"></a><tt class="py-lineno"> 52</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_gatt_array</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_var_array</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L54"></a><tt class="py-lineno"> 54</tt>  <tt class="py-line"> </tt>
<a name="NetCDFFile._numrecs"></a><div id="NetCDFFile._numrecs-def"><a name="L55"></a><tt class="py-lineno"> 55</tt> <a class="py-toggle" href="#" id="NetCDFFile._numrecs-toggle" onclick="return toggle('NetCDFFile._numrecs');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="octant.extern.pupynere.NetCDFFile-class.html#_numrecs">_numrecs</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NetCDFFile._numrecs-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="NetCDFFile._numrecs-expanded"><a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line">        <tt class="py-docstring">"""Read number of records."""</tt> </tt>
<a name="L57"></a><tt class="py-lineno"> 57</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_nrecs</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_unpack_int</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L58"></a><tt class="py-lineno"> 58</tt>  <tt class="py-line"> </tt>
<a name="NetCDFFile._dim_array"></a><div id="NetCDFFile._dim_array-def"><a name="L59"></a><tt class="py-lineno"> 59</tt> <a class="py-toggle" href="#" id="NetCDFFile._dim_array-toggle" onclick="return toggle('NetCDFFile._dim_array');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="octant.extern.pupynere.NetCDFFile-class.html#_dim_array">_dim_array</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NetCDFFile._dim_array-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="NetCDFFile._dim_array-expanded"><a name="L60"></a><tt class="py-lineno"> 60</tt>  <tt class="py-line">        <tt class="py-docstring">"""Read a dict with dimensions names and sizes."""</tt> </tt>
<a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line">        <tt class="py-keyword">assert</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-14" class="py-name"><a title="octant.extern.pupynere.NetCDFFile.read" class="py-name" href="#" onclick="return doclink('link-14', 'read', 'link-11');">read</a></tt><tt class="py-op">(</tt><tt class="py-number">4</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt id="link-15" class="py-name"><a title="octant.extern.pupynere.ZERO" class="py-name" href="#" onclick="return doclink('link-15', 'ZERO', 'link-1');">ZERO</a></tt><tt class="py-op">,</tt> <tt id="link-16" class="py-name"><a title="octant.extern.pupynere.NC_DIMENSION" class="py-name" href="#" onclick="return doclink('link-16', 'NC_DIMENSION', 'link-8');">NC_DIMENSION</a></tt><tt class="py-op">]</tt> </tt>
<a name="L62"></a><tt class="py-lineno"> 62</tt>  <tt class="py-line">        <tt class="py-name">count</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_unpack_int</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L63"></a><tt class="py-lineno"> 63</tt>  <tt class="py-line"> </tt>
<a name="L64"></a><tt class="py-lineno"> 64</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">dimensions</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L65"></a><tt class="py-lineno"> 65</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_dims</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L66"></a><tt class="py-lineno"> 66</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">dim</tt> <tt class="py-keyword">in</tt> <tt class="py-name">range</tt><tt class="py-op">(</tt><tt class="py-name">count</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L67"></a><tt class="py-lineno"> 67</tt>  <tt class="py-line">            <tt class="py-name">name</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_read_string</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L68"></a><tt class="py-lineno"> 68</tt>  <tt class="py-line">            <tt class="py-name">length</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_unpack_int</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L69"></a><tt class="py-lineno"> 69</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">length</tt> <tt class="py-op">==</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> <tt class="py-name">length</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> <tt class="py-comment"># record dimension</tt> </tt>
<a name="L70"></a><tt class="py-lineno"> 70</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">dimensions</tt><tt class="py-op">[</tt><tt class="py-name">name</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">length</tt> </tt>
<a name="L71"></a><tt class="py-lineno"> 71</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_dims</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">name</tt><tt class="py-op">)</tt>  <tt class="py-comment"># preserve dim order</tt> </tt>
</div><a name="L72"></a><tt class="py-lineno"> 72</tt>  <tt class="py-line"> </tt>
<a name="NetCDFFile._gatt_array"></a><div id="NetCDFFile._gatt_array-def"><a name="L73"></a><tt class="py-lineno"> 73</tt> <a class="py-toggle" href="#" id="NetCDFFile._gatt_array-toggle" onclick="return toggle('NetCDFFile._gatt_array');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="octant.extern.pupynere.NetCDFFile-class.html#_gatt_array">_gatt_array</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NetCDFFile._gatt_array-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="NetCDFFile._gatt_array-expanded"><a name="L74"></a><tt class="py-lineno"> 74</tt>  <tt class="py-line">        <tt class="py-docstring">"""Read global attributes."""</tt> </tt>
<a name="L75"></a><tt class="py-lineno"> 75</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_att_array</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L76"></a><tt class="py-lineno"> 76</tt>  <tt class="py-line"> </tt>
<a name="L77"></a><tt class="py-lineno"> 77</tt>  <tt class="py-line">        <tt class="py-comment"># Update __dict__ for compatibility with S.IO.N</tt> </tt>
<a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__dict__</tt><tt class="py-op">.</tt><tt class="py-name">update</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt><tt class="py-op">)</tt> </tt>
</div><a name="L79"></a><tt class="py-lineno"> 79</tt>  <tt class="py-line"> </tt>
<a name="NetCDFFile._att_array"></a><div id="NetCDFFile._att_array-def"><a name="L80"></a><tt class="py-lineno"> 80</tt> <a class="py-toggle" href="#" id="NetCDFFile._att_array-toggle" onclick="return toggle('NetCDFFile._att_array');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="octant.extern.pupynere.NetCDFFile-class.html#_att_array">_att_array</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NetCDFFile._att_array-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="NetCDFFile._att_array-expanded"><a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line">        <tt class="py-docstring">"""Read a dict with attributes."""</tt> </tt>
<a name="L82"></a><tt class="py-lineno"> 82</tt>  <tt class="py-line">        <tt class="py-keyword">assert</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-17" class="py-name"><a title="octant.extern.pupynere.NetCDFFile.read" class="py-name" href="#" onclick="return doclink('link-17', 'read', 'link-11');">read</a></tt><tt class="py-op">(</tt><tt class="py-number">4</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt id="link-18" class="py-name"><a title="octant.extern.pupynere.ZERO" class="py-name" href="#" onclick="return doclink('link-18', 'ZERO', 'link-1');">ZERO</a></tt><tt class="py-op">,</tt> <tt id="link-19" class="py-name"><a title="octant.extern.pupynere.NC_ATTRIBUTE" class="py-name" href="#" onclick="return doclink('link-19', 'NC_ATTRIBUTE', 'link-10');">NC_ATTRIBUTE</a></tt><tt class="py-op">]</tt> </tt>
<a name="L83"></a><tt class="py-lineno"> 83</tt>  <tt class="py-line">        <tt class="py-name">count</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_unpack_int</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L84"></a><tt class="py-lineno"> 84</tt>  <tt class="py-line"> </tt>
<a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line">        <tt class="py-comment"># Read attributes.</tt> </tt>
<a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">attributes</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">attribute</tt> <tt class="py-keyword">in</tt> <tt class="py-name">range</tt><tt class="py-op">(</tt><tt class="py-name">count</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line">            <tt class="py-name">name</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_read_string</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line">            <tt class="py-name">nc_type</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_unpack_int</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L90"></a><tt class="py-lineno"> 90</tt>  <tt class="py-line">            <tt class="py-name">n</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_unpack_int</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line"> </tt>
<a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line">            <tt class="py-comment"># Read value for attributes.</tt> </tt>
<a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-name">attributes</tt><tt class="py-op">[</tt><tt class="py-name">name</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_read_values</tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">,</tt> <tt class="py-name">nc_type</tt><tt class="py-op">)</tt> </tt>
<a name="L94"></a><tt class="py-lineno"> 94</tt>  <tt class="py-line"> </tt>
<a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">attributes</tt> </tt>
</div><a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line"> </tt>
<a name="NetCDFFile._var_array"></a><div id="NetCDFFile._var_array-def"><a name="L97"></a><tt class="py-lineno"> 97</tt> <a class="py-toggle" href="#" id="NetCDFFile._var_array-toggle" onclick="return toggle('NetCDFFile._var_array');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="octant.extern.pupynere.NetCDFFile-class.html#_var_array">_var_array</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NetCDFFile._var_array-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="NetCDFFile._var_array-expanded"><a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line">        <tt class="py-docstring">"""Read all variables."""</tt> </tt>
<a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line">        <tt class="py-keyword">assert</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-20" class="py-name"><a title="octant.extern.pupynere.NetCDFFile.read" class="py-name" href="#" onclick="return doclink('link-20', 'read', 'link-11');">read</a></tt><tt class="py-op">(</tt><tt class="py-number">4</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-op">[</tt><tt id="link-21" class="py-name"><a title="octant.extern.pupynere.ZERO" class="py-name" href="#" onclick="return doclink('link-21', 'ZERO', 'link-1');">ZERO</a></tt><tt class="py-op">,</tt> <tt id="link-22" class="py-name"><a title="octant.extern.pupynere.NC_VARIABLE" class="py-name" href="#" onclick="return doclink('link-22', 'NC_VARIABLE', 'link-9');">NC_VARIABLE</a></tt><tt class="py-op">]</tt> </tt>
<a name="L100"></a><tt class="py-lineno">100</tt>  <tt class="py-line"> </tt>
<a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line">        <tt class="py-comment"># Read size of each record, in bytes.</tt> </tt>
<a name="L102"></a><tt class="py-lineno">102</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_read_recsize</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line"> </tt>
<a name="L104"></a><tt class="py-lineno">104</tt>  <tt class="py-line">        <tt class="py-comment"># Read variables.</tt> </tt>
<a name="L105"></a><tt class="py-lineno">105</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">variables</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L106"></a><tt class="py-lineno">106</tt>  <tt class="py-line">        <tt class="py-name">count</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_unpack_int</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L107"></a><tt class="py-lineno">107</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">variable</tt> <tt class="py-keyword">in</tt> <tt class="py-name">range</tt><tt class="py-op">(</tt><tt class="py-name">count</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line">            <tt class="py-name">name</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_read_string</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L109"></a><tt class="py-lineno">109</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">variables</tt><tt class="py-op">[</tt><tt class="py-name">name</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_read_var</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L110"></a><tt class="py-lineno">110</tt>  <tt class="py-line"> </tt>
<a name="NetCDFFile._read_recsize"></a><div id="NetCDFFile._read_recsize-def"><a name="L111"></a><tt class="py-lineno">111</tt> <a class="py-toggle" href="#" id="NetCDFFile._read_recsize-toggle" onclick="return toggle('NetCDFFile._read_recsize');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="octant.extern.pupynere.NetCDFFile-class.html#_read_recsize">_read_recsize</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NetCDFFile._read_recsize-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="NetCDFFile._read_recsize-expanded"><a name="L112"></a><tt class="py-lineno">112</tt>  <tt class="py-line">        <tt class="py-docstring">"""Read all variables and compute record bytes."""</tt> </tt>
<a name="L113"></a><tt class="py-lineno">113</tt>  <tt class="py-line">        <tt class="py-name">pos</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_buffer</tt><tt class="py-op">.</tt><tt class="py-name">tell</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L114"></a><tt class="py-lineno">114</tt>  <tt class="py-line">         </tt>
<a name="L115"></a><tt class="py-lineno">115</tt>  <tt class="py-line">        <tt class="py-name">recsize</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L116"></a><tt class="py-lineno">116</tt>  <tt class="py-line">        <tt class="py-name">count</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_unpack_int</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L117"></a><tt class="py-lineno">117</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">variable</tt> <tt class="py-keyword">in</tt> <tt class="py-name">range</tt><tt class="py-op">(</tt><tt class="py-name">count</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L118"></a><tt class="py-lineno">118</tt>  <tt class="py-line">            <tt class="py-name">name</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_read_string</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L119"></a><tt class="py-lineno">119</tt>  <tt class="py-line">            <tt class="py-name">n</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_unpack_int</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L120"></a><tt class="py-lineno">120</tt>  <tt class="py-line">            <tt class="py-name">isrec</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L121"></a><tt class="py-lineno">121</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">i</tt> <tt class="py-keyword">in</tt> <tt class="py-name">range</tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L122"></a><tt class="py-lineno">122</tt>  <tt class="py-line">                <tt class="py-name">dimid</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_unpack_int</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L123"></a><tt class="py-lineno">123</tt>  <tt class="py-line">                <tt class="py-name">name</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_dims</tt><tt class="py-op">[</tt><tt class="py-name">dimid</tt><tt class="py-op">]</tt> </tt>
<a name="L124"></a><tt class="py-lineno">124</tt>  <tt class="py-line">                <tt class="py-name">dim</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">dimensions</tt><tt class="py-op">[</tt><tt class="py-name">name</tt><tt class="py-op">]</tt> </tt>
<a name="L125"></a><tt class="py-lineno">125</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">dim</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt> <tt class="py-keyword">and</tt> <tt class="py-name">i</tt> <tt class="py-op">==</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L126"></a><tt class="py-lineno">126</tt>  <tt class="py-line">                    <tt class="py-name">isrec</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L127"></a><tt class="py-lineno">127</tt>  <tt class="py-line">            <tt class="py-name">attributes</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_att_array</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L128"></a><tt class="py-lineno">128</tt>  <tt class="py-line">            <tt class="py-name">nc_type</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_unpack_int</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L129"></a><tt class="py-lineno">129</tt>  <tt class="py-line">            <tt class="py-name">vsize</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_unpack_int</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L130"></a><tt class="py-lineno">130</tt>  <tt class="py-line">            <tt class="py-name">begin</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_unpack_int</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_unpack_int64</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">version_byte</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L131"></a><tt class="py-lineno">131</tt>  <tt class="py-line"> </tt>
<a name="L132"></a><tt class="py-lineno">132</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">isrec</tt><tt class="py-op">:</tt> <tt class="py-name">recsize</tt> <tt class="py-op">+=</tt> <tt class="py-name">vsize</tt> </tt>
<a name="L133"></a><tt class="py-lineno">133</tt>  <tt class="py-line"> </tt>
<a name="L134"></a><tt class="py-lineno">134</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_recsize</tt> <tt class="py-op">=</tt> <tt class="py-name">recsize</tt> </tt>
<a name="L135"></a><tt class="py-lineno">135</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_buffer</tt><tt class="py-op">.</tt><tt class="py-name">seek</tt><tt class="py-op">(</tt><tt class="py-name">pos</tt><tt class="py-op">)</tt> </tt>
</div><a name="L136"></a><tt class="py-lineno">136</tt>  <tt class="py-line"> </tt>
<a name="NetCDFFile._read_var"></a><div id="NetCDFFile._read_var-def"><a name="L137"></a><tt class="py-lineno">137</tt> <a class="py-toggle" href="#" id="NetCDFFile._read_var-toggle" onclick="return toggle('NetCDFFile._read_var');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="octant.extern.pupynere.NetCDFFile-class.html#_read_var">_read_var</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NetCDFFile._read_var-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="NetCDFFile._read_var-expanded"><a name="L138"></a><tt class="py-lineno">138</tt>  <tt class="py-line">        <tt class="py-name">dimensions</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L139"></a><tt class="py-lineno">139</tt>  <tt class="py-line">        <tt class="py-name">shape</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
<a name="L140"></a><tt class="py-lineno">140</tt>  <tt class="py-line">        <tt class="py-name">n</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_unpack_int</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L141"></a><tt class="py-lineno">141</tt>  <tt class="py-line">        <tt class="py-name">isrec</tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L142"></a><tt class="py-lineno">142</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">i</tt> <tt class="py-keyword">in</tt> <tt class="py-name">range</tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L143"></a><tt class="py-lineno">143</tt>  <tt class="py-line">            <tt class="py-name">dimid</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_unpack_int</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L144"></a><tt class="py-lineno">144</tt>  <tt class="py-line">            <tt class="py-name">name</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_dims</tt><tt class="py-op">[</tt><tt class="py-name">dimid</tt><tt class="py-op">]</tt> </tt>
<a name="L145"></a><tt class="py-lineno">145</tt>  <tt class="py-line">            <tt class="py-name">dimensions</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">name</tt><tt class="py-op">)</tt> </tt>
<a name="L146"></a><tt class="py-lineno">146</tt>  <tt class="py-line">            <tt class="py-name">dim</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">dimensions</tt><tt class="py-op">[</tt><tt class="py-name">name</tt><tt class="py-op">]</tt> </tt>
<a name="L147"></a><tt class="py-lineno">147</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">dim</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt> <tt class="py-keyword">and</tt> <tt class="py-name">i</tt> <tt class="py-op">==</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
<a name="L148"></a><tt class="py-lineno">148</tt>  <tt class="py-line">                <tt class="py-name">dim</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_nrecs</tt> </tt>
<a name="L149"></a><tt class="py-lineno">149</tt>  <tt class="py-line">                <tt class="py-name">isrec</tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L150"></a><tt class="py-lineno">150</tt>  <tt class="py-line">            <tt class="py-name">shape</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">dim</tt><tt class="py-op">)</tt> </tt>
<a name="L151"></a><tt class="py-lineno">151</tt>  <tt class="py-line">        <tt class="py-name">dimensions</tt> <tt class="py-op">=</tt> <tt class="py-name">tuple</tt><tt class="py-op">(</tt><tt class="py-name">dimensions</tt><tt class="py-op">)</tt> </tt>
<a name="L152"></a><tt class="py-lineno">152</tt>  <tt class="py-line">        <tt class="py-name">shape</tt> <tt class="py-op">=</tt> <tt class="py-name">tuple</tt><tt class="py-op">(</tt><tt class="py-name">shape</tt><tt class="py-op">)</tt> </tt>
<a name="L153"></a><tt class="py-lineno">153</tt>  <tt class="py-line"> </tt>
<a name="L154"></a><tt class="py-lineno">154</tt>  <tt class="py-line">        <tt class="py-name">attributes</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_att_array</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L155"></a><tt class="py-lineno">155</tt>  <tt class="py-line">        <tt class="py-name">nc_type</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_unpack_int</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L156"></a><tt class="py-lineno">156</tt>  <tt class="py-line">        <tt class="py-name">vsize</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_unpack_int</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L157"></a><tt class="py-lineno">157</tt>  <tt class="py-line">         </tt>
<a name="L158"></a><tt class="py-lineno">158</tt>  <tt class="py-line">        <tt class="py-comment"># Read offset.</tt> </tt>
<a name="L159"></a><tt class="py-lineno">159</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">begin</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_unpack_int</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_unpack_int64</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">version_byte</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L160"></a><tt class="py-lineno">160</tt>  <tt class="py-line"> </tt>
<a name="L161"></a><tt class="py-lineno">161</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-23" class="py-name" targets="Class octant.extern.pupynere.NetCDFVariable=octant.extern.pupynere.NetCDFVariable-class.html"><a title="octant.extern.pupynere.NetCDFVariable" class="py-name" href="#" onclick="return doclink('link-23', 'NetCDFVariable', 'link-23');">NetCDFVariable</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_buffer</tt><tt class="py-op">.</tt><tt class="py-name">fileno</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">nc_type</tt><tt class="py-op">,</tt> <tt class="py-name">vsize</tt><tt class="py-op">,</tt> <tt class="py-name">begin</tt><tt class="py-op">,</tt> <tt class="py-name">shape</tt><tt class="py-op">,</tt> <tt class="py-name">dimensions</tt><tt class="py-op">,</tt> <tt class="py-name">attributes</tt><tt class="py-op">,</tt> <tt class="py-name">isrec</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_recsize</tt><tt class="py-op">)</tt> </tt>
</div><a name="L162"></a><tt class="py-lineno">162</tt>  <tt class="py-line"> </tt>
<a name="NetCDFFile._read_values"></a><div id="NetCDFFile._read_values-def"><a name="L163"></a><tt class="py-lineno">163</tt> <a class="py-toggle" href="#" id="NetCDFFile._read_values-toggle" onclick="return toggle('NetCDFFile._read_values');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="octant.extern.pupynere.NetCDFFile-class.html#_read_values">_read_values</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">n</tt><tt class="py-op">,</tt> <tt class="py-param">nc_type</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NetCDFFile._read_values-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="NetCDFFile._read_values-expanded"><a name="L164"></a><tt class="py-lineno">164</tt>  <tt class="py-line">        <tt class="py-name">bytes</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-number">2</tt><tt class="py-op">,</tt> <tt class="py-number">4</tt><tt class="py-op">,</tt> <tt class="py-number">4</tt><tt class="py-op">,</tt> <tt class="py-number">8</tt><tt class="py-op">]</tt> </tt>
<a name="L165"></a><tt class="py-lineno">165</tt>  <tt class="py-line">        <tt id="link-24" class="py-name" targets="Variable octant.ocean.depths.typecodes=octant.ocean.depths-module.html#typecodes,Variable octant.ocean.state.typecodes=octant.ocean.state-module.html#typecodes,Variable octant.ocean.step3d_t.typecodes=octant.ocean.step3d_t-module.html#typecodes,Variable octant.ocean.time.typecodes=octant.ocean.time-module.html#typecodes,Variable octant.ocean.typecodes=octant.ocean-module.html#typecodes,Variable octant.ocean.velocity.typecodes=octant.ocean.velocity-module.html#typecodes"><a title="octant.ocean.depths.typecodes
octant.ocean.state.typecodes
octant.ocean.step3d_t.typecodes
octant.ocean.time.typecodes
octant.ocean.typecodes
octant.ocean.velocity.typecodes" class="py-name" href="#" onclick="return doclink('link-24', 'typecodes', 'link-24');">typecodes</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'b'</tt><tt class="py-op">,</tt> <tt class="py-string">'c'</tt><tt class="py-op">,</tt> <tt class="py-string">'h'</tt><tt class="py-op">,</tt> <tt class="py-string">'i'</tt><tt class="py-op">,</tt> <tt class="py-string">'f'</tt><tt class="py-op">,</tt> <tt class="py-string">'d'</tt><tt class="py-op">]</tt> </tt>
<a name="L166"></a><tt class="py-lineno">166</tt>  <tt class="py-line">         </tt>
<a name="L167"></a><tt class="py-lineno">167</tt>  <tt class="py-line">        <tt class="py-name">count</tt> <tt class="py-op">=</tt> <tt class="py-name">n</tt> <tt class="py-op">*</tt> <tt class="py-name">bytes</tt><tt class="py-op">[</tt><tt class="py-name">nc_type</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
<a name="L168"></a><tt class="py-lineno">168</tt>  <tt class="py-line">        <tt class="py-name">values</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-25" class="py-name"><a title="octant.extern.pupynere.NetCDFFile.read" class="py-name" href="#" onclick="return doclink('link-25', 'read', 'link-11');">read</a></tt><tt class="py-op">(</tt><tt class="py-name">count</tt><tt class="py-op">)</tt> </tt>
<a name="L169"></a><tt class="py-lineno">169</tt>  <tt class="py-line">        <tt class="py-name">padding</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-26" class="py-name"><a title="octant.extern.pupynere.NetCDFFile.read" class="py-name" href="#" onclick="return doclink('link-26', 'read', 'link-11');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-number">4</tt> <tt class="py-op">-</tt> <tt class="py-op">(</tt><tt class="py-name">count</tt> <tt class="py-op">%</tt> <tt class="py-number">4</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-op">%</tt> <tt class="py-number">4</tt><tt class="py-op">)</tt> </tt>
<a name="L170"></a><tt class="py-lineno">170</tt>  <tt class="py-line">         </tt>
<a name="L171"></a><tt class="py-lineno">171</tt>  <tt class="py-line">        <tt id="link-27" class="py-name" targets="Method octant.extern.pupynere.NetCDFVariable.typecode()=octant.extern.pupynere.NetCDFVariable-class.html#typecode"><a title="octant.extern.pupynere.NetCDFVariable.typecode" class="py-name" href="#" onclick="return doclink('link-27', 'typecode', 'link-27');">typecode</a></tt> <tt class="py-op">=</tt> <tt id="link-28" class="py-name"><a title="octant.ocean.depths.typecodes
octant.ocean.state.typecodes
octant.ocean.step3d_t.typecodes
octant.ocean.time.typecodes
octant.ocean.typecodes
octant.ocean.velocity.typecodes" class="py-name" href="#" onclick="return doclink('link-28', 'typecodes', 'link-24');">typecodes</a></tt><tt class="py-op">[</tt><tt class="py-name">nc_type</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
<a name="L172"></a><tt class="py-lineno">172</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">nc_type</tt> <tt class="py-op">!=</tt> <tt class="py-number">2</tt><tt class="py-op">:</tt>  <tt class="py-comment"># not char </tt> </tt>
<a name="L173"></a><tt class="py-lineno">173</tt>  <tt class="py-line">            <tt class="py-name">values</tt> <tt class="py-op">=</tt> <tt class="py-name">struct</tt><tt class="py-op">.</tt><tt class="py-name">unpack</tt><tt class="py-op">(</tt><tt class="py-string">'&gt;%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt id="link-29" class="py-name"><a title="octant.extern.pupynere.NetCDFVariable.typecode" class="py-name" href="#" onclick="return doclink('link-29', 'typecode', 'link-27');">typecode</a></tt> <tt class="py-op">*</tt> <tt class="py-name">n</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">values</tt><tt class="py-op">)</tt> </tt>
<a name="L174"></a><tt class="py-lineno">174</tt>  <tt class="py-line">            <tt class="py-name">values</tt> <tt class="py-op">=</tt> <tt class="py-name">array</tt><tt class="py-op">(</tt><tt class="py-name">values</tt><tt class="py-op">,</tt> <tt class="py-name">dtype</tt><tt class="py-op">=</tt><tt id="link-30" class="py-name"><a title="octant.extern.pupynere.NetCDFVariable.typecode" class="py-name" href="#" onclick="return doclink('link-30', 'typecode', 'link-27');">typecode</a></tt><tt class="py-op">)</tt>  </tt>
<a name="L175"></a><tt class="py-lineno">175</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L176"></a><tt class="py-lineno">176</tt>  <tt class="py-line">            <tt class="py-comment"># Remove EOL terminator.</tt> </tt>
<a name="L177"></a><tt class="py-lineno">177</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">if</tt> <tt class="py-name">values</tt><tt class="py-op">.</tt><tt class="py-name">endswith</tt><tt class="py-op">(</tt><tt class="py-string">'\x00'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-name">values</tt> <tt class="py-op">=</tt> <tt class="py-name">values</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
<a name="L178"></a><tt class="py-lineno">178</tt>  <tt class="py-line"> </tt>
<a name="L179"></a><tt class="py-lineno">179</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">values</tt> </tt>
</div><a name="L180"></a><tt class="py-lineno">180</tt>  <tt class="py-line"> </tt>
<a name="NetCDFFile._unpack_int"></a><div id="NetCDFFile._unpack_int-def"><a name="L181"></a><tt class="py-lineno">181</tt> <a class="py-toggle" href="#" id="NetCDFFile._unpack_int-toggle" onclick="return toggle('NetCDFFile._unpack_int');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="octant.extern.pupynere.NetCDFFile-class.html#_unpack_int">_unpack_int</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NetCDFFile._unpack_int-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="NetCDFFile._unpack_int-expanded"><a name="L182"></a><tt class="py-lineno">182</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">struct</tt><tt class="py-op">.</tt><tt class="py-name">unpack</tt><tt class="py-op">(</tt><tt class="py-string">'&gt;i'</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-31" class="py-name"><a title="octant.extern.pupynere.NetCDFFile.read" class="py-name" href="#" onclick="return doclink('link-31', 'read', 'link-11');">read</a></tt><tt class="py-op">(</tt><tt class="py-number">4</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
</div><a name="L183"></a><tt class="py-lineno">183</tt>  <tt class="py-line">    <tt class="py-name">_unpack_int32</tt> <tt class="py-op">=</tt> <tt class="py-name">_unpack_int</tt> </tt>
<a name="L184"></a><tt class="py-lineno">184</tt>  <tt class="py-line"> </tt>
<a name="NetCDFFile._unpack_int64"></a><div id="NetCDFFile._unpack_int64-def"><a name="L185"></a><tt class="py-lineno">185</tt> <a class="py-toggle" href="#" id="NetCDFFile._unpack_int64-toggle" onclick="return toggle('NetCDFFile._unpack_int64');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="octant.extern.pupynere.NetCDFFile-class.html#_unpack_int64">_unpack_int64</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NetCDFFile._unpack_int64-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="NetCDFFile._unpack_int64-expanded"><a name="L186"></a><tt class="py-lineno">186</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">struct</tt><tt class="py-op">.</tt><tt class="py-name">unpack</tt><tt class="py-op">(</tt><tt class="py-string">'&gt;q'</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-32" class="py-name"><a title="octant.extern.pupynere.NetCDFFile.read" class="py-name" href="#" onclick="return doclink('link-32', 'read', 'link-11');">read</a></tt><tt class="py-op">(</tt><tt class="py-number">8</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
</div><a name="L187"></a><tt class="py-lineno">187</tt>  <tt class="py-line"> </tt>
<a name="NetCDFFile._read_string"></a><div id="NetCDFFile._read_string-def"><a name="L188"></a><tt class="py-lineno">188</tt> <a class="py-toggle" href="#" id="NetCDFFile._read_string-toggle" onclick="return toggle('NetCDFFile._read_string');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="octant.extern.pupynere.NetCDFFile-class.html#_read_string">_read_string</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NetCDFFile._read_string-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="NetCDFFile._read_string-expanded"><a name="L189"></a><tt class="py-lineno">189</tt>  <tt class="py-line">        <tt class="py-name">count</tt> <tt class="py-op">=</tt> <tt class="py-name">struct</tt><tt class="py-op">.</tt><tt class="py-name">unpack</tt><tt class="py-op">(</tt><tt class="py-string">'&gt;i'</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-33" class="py-name"><a title="octant.extern.pupynere.NetCDFFile.read" class="py-name" href="#" onclick="return doclink('link-33', 'read', 'link-11');">read</a></tt><tt class="py-op">(</tt><tt class="py-number">4</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
<a name="L190"></a><tt class="py-lineno">190</tt>  <tt class="py-line">        <tt class="py-name">s</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-34" class="py-name"><a title="octant.extern.pupynere.NetCDFFile.read" class="py-name" href="#" onclick="return doclink('link-34', 'read', 'link-11');">read</a></tt><tt class="py-op">(</tt><tt class="py-name">count</tt><tt class="py-op">)</tt> </tt>
<a name="L191"></a><tt class="py-lineno">191</tt>  <tt class="py-line">        <tt class="py-comment"># Remove EOL terminator.</tt> </tt>
<a name="L192"></a><tt class="py-lineno">192</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt class="py-name">s</tt><tt class="py-op">.</tt><tt class="py-name">endswith</tt><tt class="py-op">(</tt><tt class="py-string">'\x00'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-name">s</tt> <tt class="py-op">=</tt> <tt class="py-name">s</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
<a name="L193"></a><tt class="py-lineno">193</tt>  <tt class="py-line">        <tt class="py-name">padding</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-35" class="py-name"><a title="octant.extern.pupynere.NetCDFFile.read" class="py-name" href="#" onclick="return doclink('link-35', 'read', 'link-11');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">(</tt><tt class="py-number">4</tt> <tt class="py-op">-</tt> <tt class="py-op">(</tt><tt class="py-name">count</tt> <tt class="py-op">%</tt> <tt class="py-number">4</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> <tt class="py-op">%</tt> <tt class="py-number">4</tt><tt class="py-op">)</tt> </tt>
<a name="L194"></a><tt class="py-lineno">194</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">s</tt> </tt>
</div><a name="L195"></a><tt class="py-lineno">195</tt>  <tt class="py-line"> </tt>
<a name="NetCDFFile.close"></a><div id="NetCDFFile.close-def"><a name="L196"></a><tt class="py-lineno">196</tt> <a class="py-toggle" href="#" id="NetCDFFile.close-toggle" onclick="return toggle('NetCDFFile.close');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="octant.extern.pupynere.NetCDFFile-class.html#close">close</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NetCDFFile.close-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="NetCDFFile.close-expanded"><a name="L197"></a><tt class="py-lineno">197</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_buffer</tt><tt class="py-op">.</tt><tt id="link-36" class="py-name" targets="Method octant.extern.pupynere.NetCDFFile.close()=octant.extern.pupynere.NetCDFFile-class.html#close,Method octant.getm.Bdy2d.close()=octant.getm.Bdy2d-class.html#close,Method octant.getm.Bdy3d.close()=octant.getm.Bdy3d-class.html#close"><a title="octant.extern.pupynere.NetCDFFile.close
octant.getm.Bdy2d.close
octant.getm.Bdy3d.close" class="py-name" href="#" onclick="return doclink('link-36', 'close', 'link-36');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L198"></a><tt class="py-lineno">198</tt>  <tt class="py-line"> </tt>
<a name="L199"></a><tt class="py-lineno">199</tt>  <tt class="py-line"> </tt>
<a name="NetCDFVariable"></a><div id="NetCDFVariable-def"><a name="L200"></a><tt class="py-lineno">200</tt> <a class="py-toggle" href="#" id="NetCDFVariable-toggle" onclick="return toggle('NetCDFVariable');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="octant.extern.pupynere.NetCDFVariable-class.html">NetCDFVariable</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NetCDFVariable-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="NetCDFVariable-expanded"><a name="NetCDFVariable.__init__"></a><div id="NetCDFVariable.__init__-def"><a name="L201"></a><tt class="py-lineno">201</tt> <a class="py-toggle" href="#" id="NetCDFVariable.__init__-toggle" onclick="return toggle('NetCDFVariable.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="octant.extern.pupynere.NetCDFVariable-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">fileno</tt><tt class="py-op">,</tt> <tt class="py-param">nc_type</tt><tt class="py-op">,</tt> <tt class="py-param">vsize</tt><tt class="py-op">,</tt> <tt class="py-param">begin</tt><tt class="py-op">,</tt> <tt class="py-param">shape</tt><tt class="py-op">,</tt> <tt class="py-param">dimensions</tt><tt class="py-op">,</tt> <tt class="py-param">attributes</tt><tt class="py-op">,</tt> <tt class="py-param">isrec</tt><tt class="py-op">=</tt><tt class="py-name">False</tt><tt class="py-op">,</tt> <tt class="py-param">recsize</tt><tt class="py-op">=</tt><tt class="py-number">0</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NetCDFVariable.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="NetCDFVariable.__init__-expanded"><a name="L202"></a><tt class="py-lineno">202</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_nc_type</tt> <tt class="py-op">=</tt> <tt class="py-name">nc_type</tt> </tt>
<a name="L203"></a><tt class="py-lineno">203</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_vsize</tt> <tt class="py-op">=</tt> <tt class="py-name">vsize</tt> </tt>
<a name="L204"></a><tt class="py-lineno">204</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_begin</tt> <tt class="py-op">=</tt> <tt class="py-name">begin</tt> </tt>
<a name="L205"></a><tt class="py-lineno">205</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">shape</tt> <tt class="py-op">=</tt> <tt class="py-name">shape</tt> </tt>
<a name="L206"></a><tt class="py-lineno">206</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">dimensions</tt> <tt class="py-op">=</tt> <tt class="py-name">dimensions</tt> </tt>
<a name="L207"></a><tt class="py-lineno">207</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">attributes</tt> <tt class="py-op">=</tt> <tt class="py-name">attributes</tt>  <tt class="py-comment"># for ``dap.plugins.netcdf``</tt> </tt>
<a name="L208"></a><tt class="py-lineno">208</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__dict__</tt><tt class="py-op">.</tt><tt class="py-name">update</tt><tt class="py-op">(</tt><tt class="py-name">attributes</tt><tt class="py-op">)</tt> </tt>
<a name="L209"></a><tt class="py-lineno">209</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_is_record</tt> <tt class="py-op">=</tt> <tt class="py-name">isrec</tt> </tt>
<a name="L210"></a><tt class="py-lineno">210</tt>  <tt class="py-line"> </tt>
<a name="L211"></a><tt class="py-lineno">211</tt>  <tt class="py-line">        <tt class="py-comment"># Number of bytes and type.</tt> </tt>
<a name="L212"></a><tt class="py-lineno">212</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_bytes</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-number">2</tt><tt class="py-op">,</tt> <tt class="py-number">4</tt><tt class="py-op">,</tt> <tt class="py-number">4</tt><tt class="py-op">,</tt> <tt class="py-number">8</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_nc_type</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
<a name="L213"></a><tt class="py-lineno">213</tt>  <tt class="py-line">        <tt class="py-name">type_</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'i'</tt><tt class="py-op">,</tt> <tt class="py-string">'S'</tt><tt class="py-op">,</tt> <tt class="py-string">'i'</tt><tt class="py-op">,</tt> <tt class="py-string">'i'</tt><tt class="py-op">,</tt> <tt class="py-string">'f'</tt><tt class="py-op">,</tt> <tt class="py-string">'f'</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_nc_type</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
<a name="L214"></a><tt class="py-lineno">214</tt>  <tt class="py-line">        <tt class="py-name">dtype</tt> <tt class="py-op">=</tt> <tt class="py-string">'&gt;%s%d'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">type_</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_bytes</tt><tt class="py-op">)</tt> </tt>
<a name="L215"></a><tt class="py-lineno">215</tt>  <tt class="py-line">        <tt class="py-name">bytes</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_begin</tt> <tt class="py-op">+</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_vsize</tt>  </tt>
<a name="L216"></a><tt class="py-lineno">216</tt>  <tt class="py-line"> </tt>
<a name="L217"></a><tt class="py-lineno">217</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">isrec</tt><tt class="py-op">:</tt> </tt>
<a name="L218"></a><tt class="py-lineno">218</tt>  <tt class="py-line">            <tt class="py-comment"># Record variables are not stored contiguosly on disk, so we </tt> </tt>
<a name="L219"></a><tt class="py-lineno">219</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-comment"># need to create a separate array for each record.</tt> </tt>
<a name="L220"></a><tt class="py-lineno">220</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__array_data__</tt> <tt class="py-op">=</tt> <tt class="py-name">zeros</tt><tt class="py-op">(</tt><tt class="py-name">shape</tt><tt class="py-op">,</tt> <tt class="py-name">dtype</tt><tt class="py-op">)</tt> </tt>
<a name="L221"></a><tt class="py-lineno">221</tt>  <tt class="py-line">            <tt class="py-name">bytes</tt> <tt class="py-op">+=</tt> <tt class="py-op">(</tt><tt class="py-name">shape</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">-</tt> <tt class="py-number">1</tt><tt class="py-op">)</tt> <tt class="py-op">*</tt> <tt class="py-name">recsize</tt> </tt>
<a name="L222"></a><tt class="py-lineno">222</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">n</tt> <tt class="py-keyword">in</tt> <tt class="py-name">range</tt><tt class="py-op">(</tt><tt class="py-name">shape</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L223"></a><tt class="py-lineno">223</tt>  <tt class="py-line">                <tt class="py-name">offset</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_begin</tt> <tt class="py-op">+</tt> <tt class="py-op">(</tt><tt class="py-name">n</tt> <tt class="py-op">*</tt> <tt class="py-name">recsize</tt><tt class="py-op">)</tt> </tt>
<a name="L224"></a><tt class="py-lineno">224</tt>  <tt class="py-line">                <tt class="py-name">mm</tt> <tt class="py-op">=</tt> <tt class="py-name">mmap</tt><tt class="py-op">.</tt><tt class="py-name">mmap</tt><tt class="py-op">(</tt><tt class="py-name">fileno</tt><tt class="py-op">,</tt> <tt class="py-name">bytes</tt><tt class="py-op">,</tt> <tt class="py-name">access</tt><tt class="py-op">=</tt><tt class="py-name">mmap</tt><tt class="py-op">.</tt><tt class="py-name">ACCESS_READ</tt><tt class="py-op">)</tt> </tt>
<a name="L225"></a><tt class="py-lineno">225</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__array_data__</tt><tt class="py-op">[</tt><tt class="py-name">n</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">ndarray</tt><tt class="py-op">.</tt><tt id="link-37" class="py-name" targets="Static Method octant.cf.time.__new__()=octant.cf.time-class.html#__new__,Static Method octant.ocean.time.time.__new__()=octant.ocean.time.time-class.html#__new__"><a title="octant.cf.time.__new__
octant.ocean.time.time.__new__" class="py-name" href="#" onclick="return doclink('link-37', '__new__', 'link-37');">__new__</a></tt><tt class="py-op">(</tt><tt class="py-name">ndarray</tt><tt class="py-op">,</tt> <tt class="py-name">shape</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">dtype</tt><tt class="py-op">=</tt><tt class="py-name">dtype</tt><tt class="py-op">,</tt> <tt class="py-name">buffer</tt><tt class="py-op">=</tt><tt class="py-name">mm</tt><tt class="py-op">,</tt> <tt class="py-name">offset</tt><tt class="py-op">=</tt><tt class="py-name">offset</tt><tt class="py-op">,</tt> <tt class="py-name">order</tt><tt class="py-op">=</tt><tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
<a name="L226"></a><tt class="py-lineno">226</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L227"></a><tt class="py-lineno">227</tt>  <tt class="py-line">            <tt class="py-comment"># Create buffer and data.</tt> </tt>
<a name="L228"></a><tt class="py-lineno">228</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-name">mm</tt> <tt class="py-op">=</tt> <tt class="py-name">mmap</tt><tt class="py-op">.</tt><tt class="py-name">mmap</tt><tt class="py-op">(</tt><tt class="py-name">fileno</tt><tt class="py-op">,</tt> <tt class="py-name">bytes</tt><tt class="py-op">,</tt> <tt class="py-name">access</tt><tt class="py-op">=</tt><tt class="py-name">mmap</tt><tt class="py-op">.</tt><tt class="py-name">ACCESS_READ</tt><tt class="py-op">)</tt> </tt>
<a name="L229"></a><tt class="py-lineno">229</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__array_data__</tt> <tt class="py-op">=</tt> <tt class="py-name">ndarray</tt><tt class="py-op">.</tt><tt id="link-38" class="py-name"><a title="octant.cf.time.__new__
octant.ocean.time.time.__new__" class="py-name" href="#" onclick="return doclink('link-38', '__new__', 'link-37');">__new__</a></tt><tt class="py-op">(</tt><tt class="py-name">ndarray</tt><tt class="py-op">,</tt> <tt class="py-name">shape</tt><tt class="py-op">,</tt> <tt class="py-name">dtype</tt><tt class="py-op">=</tt><tt class="py-name">dtype</tt><tt class="py-op">,</tt> <tt class="py-name">buffer</tt><tt class="py-op">=</tt><tt class="py-name">mm</tt><tt class="py-op">,</tt> <tt class="py-name">offset</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_begin</tt><tt class="py-op">,</tt> <tt class="py-name">order</tt><tt class="py-op">=</tt><tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
<a name="L230"></a><tt class="py-lineno">230</tt>  <tt class="py-line"> </tt>
<a name="L231"></a><tt class="py-lineno">231</tt>  <tt class="py-line">        <tt class="py-comment"># N-D array interface</tt> </tt>
<a name="L232"></a><tt class="py-lineno">232</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__array_interface__</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-string">'shape'</tt>  <tt class="py-op">:</tt> <tt class="py-name">shape</tt><tt class="py-op">,</tt> </tt>
<a name="L233"></a><tt class="py-lineno">233</tt>  <tt class="py-line">                                    <tt class="py-string">'typestr'</tt><tt class="py-op">:</tt> <tt class="py-name">dtype</tt><tt class="py-op">,</tt> </tt>
<a name="L234"></a><tt class="py-lineno">234</tt>  <tt class="py-line">                                    <tt class="py-string">'data'</tt>   <tt class="py-op">:</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__array_data__</tt><tt class="py-op">,</tt> </tt>
<a name="L235"></a><tt class="py-lineno">235</tt>  <tt class="py-line">                                    <tt class="py-string">'version'</tt><tt class="py-op">:</tt> <tt class="py-number">3</tt><tt class="py-op">,</tt> </tt>
<a name="L236"></a><tt class="py-lineno">236</tt>  <tt class="py-line">                                   <tt class="py-op">}</tt> </tt>
</div><a name="L237"></a><tt class="py-lineno">237</tt>  <tt class="py-line"> </tt>
<a name="NetCDFVariable.__getitem__"></a><div id="NetCDFVariable.__getitem__-def"><a name="L238"></a><tt class="py-lineno">238</tt> <a class="py-toggle" href="#" id="NetCDFVariable.__getitem__-toggle" onclick="return toggle('NetCDFVariable.__getitem__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="octant.extern.pupynere.NetCDFVariable-class.html#__getitem__">__getitem__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">index</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NetCDFVariable.__getitem__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="NetCDFVariable.__getitem__-expanded"><a name="L239"></a><tt class="py-lineno">239</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__array_data__</tt><tt class="py-op">.</tt><tt id="link-39" class="py-name" targets="Method octant.depths.s_coordinate.__getitem__()=octant.depths.s_coordinate-class.html#__getitem__,Method octant.extern.pupynere.NetCDFVariable.__getitem__()=octant.extern.pupynere.NetCDFVariable-class.html#__getitem__,Method octant.ocean.depths.Depths.__getitem__()=octant.ocean.depths.Depths-class.html#__getitem__,Method octant.ocean.velocity.nc_velocity.__getitem__()=octant.ocean.velocity.nc_velocity-class.html#__getitem__,Method octant.roms.nc_N2.__getitem__()=octant.roms.nc_N2-class.html#__getitem__"><a title="octant.depths.s_coordinate.__getitem__
octant.extern.pupynere.NetCDFVariable.__getitem__
octant.ocean.depths.Depths.__getitem__
octant.ocean.velocity.nc_velocity.__getitem__
octant.roms.nc_N2.__getitem__" class="py-name" href="#" onclick="return doclink('link-39', '__getitem__', 'link-39');">__getitem__</a></tt><tt class="py-op">(</tt><tt class="py-name">index</tt><tt class="py-op">)</tt> </tt>
</div><a name="L240"></a><tt class="py-lineno">240</tt>  <tt class="py-line"> </tt>
<a name="NetCDFVariable.getValue"></a><div id="NetCDFVariable.getValue-def"><a name="L241"></a><tt class="py-lineno">241</tt> <a class="py-toggle" href="#" id="NetCDFVariable.getValue-toggle" onclick="return toggle('NetCDFVariable.getValue');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="octant.extern.pupynere.NetCDFVariable-class.html#getValue">getValue</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NetCDFVariable.getValue-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="NetCDFVariable.getValue-expanded"><a name="L242"></a><tt class="py-lineno">242</tt>  <tt class="py-line">        <tt class="py-docstring">"""For scalars."""</tt> </tt>
<a name="L243"></a><tt class="py-lineno">243</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__array_data__</tt><tt class="py-op">.</tt><tt class="py-name">item</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L244"></a><tt class="py-lineno">244</tt>  <tt class="py-line"> </tt>
<a name="NetCDFVariable.typecode"></a><div id="NetCDFVariable.typecode-def"><a name="L245"></a><tt class="py-lineno">245</tt> <a class="py-toggle" href="#" id="NetCDFVariable.typecode-toggle" onclick="return toggle('NetCDFVariable.typecode');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="octant.extern.pupynere.NetCDFVariable-class.html#typecode">typecode</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="NetCDFVariable.typecode-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="NetCDFVariable.typecode-expanded"><a name="L246"></a><tt class="py-lineno">246</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">[</tt><tt class="py-string">'b'</tt><tt class="py-op">,</tt> <tt class="py-string">'c'</tt><tt class="py-op">,</tt> <tt class="py-string">'h'</tt><tt class="py-op">,</tt> <tt class="py-string">'i'</tt><tt class="py-op">,</tt> <tt class="py-string">'f'</tt><tt class="py-op">,</tt> <tt class="py-string">'d'</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_nc_type</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> </tt>
</div></div><a name="L247"></a><tt class="py-lineno">247</tt>  <tt class="py-line"> </tt>
<a name="L248"></a><tt class="py-lineno">248</tt>  <tt class="py-line">             </tt>
<a name="_test"></a><div id="_test-def"><a name="L249"></a><tt class="py-lineno">249</tt> <a class="py-toggle" href="#" id="_test-toggle" onclick="return toggle('_test');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="octant.extern.pupynere-module.html#_test">_test</a><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="_test-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="_test-expanded"><a name="L250"></a><tt class="py-lineno">250</tt>  <tt class="py-line">    <tt class="py-keyword">import</tt> <tt class="py-name">doctest</tt> </tt>
<a name="L251"></a><tt class="py-lineno">251</tt>  <tt class="py-line">    <tt class="py-name">doctest</tt><tt class="py-op">.</tt><tt class="py-name">testmod</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L252"></a><tt class="py-lineno">252</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="octant-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1
    on Mon Apr 20 11:56:31 2009
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
